package com.shop.cereshop.commons.tencent.im.model.msg.dto;

import com.shop.cereshop.commons.tencent.im.model.msg.data.CustomMsgData;
import lombok.*;

import java.io.Serializable;

/**
 * @description: 腾讯云IM消息传输数据
 * @author zdd
 * @date 2025/9/9 22:45
 * @version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
public class CustomMsgDTO implements Serializable {

    private static final long serialVersionUID = -7102796968963047888L;

    private String fromAccount;

    private String toAccount;

    private String groupId;

    private String data;

    private String desc;

    private String ext;

    private String sound;

    /**
     * 构建红包自定义消息数据
     * @return 自定义消息数据
     */
    public CustomMsgData covertToCustomMsgData() {
        CustomMsgData msgData = new CustomMsgData();
        msgData.setData(this.data);
        msgData.setDesc(this.desc);
        msgData.setExt(this.ext);
        msgData.setSound(this.sound);
        return msgData;
    }

}
